<!--编辑导航-->
<div class="dialog_content">
	<form id="info_form" action="{:url('editDo')}" method="post">
		<table width="100%" class="table_form">
			<tr>
				<th width="80">导航名称 :</th>
				<td>
					<input type="text" name="title" id="title" value="{$info.title}" class="input-text" size="20">
				</td>
			</tr>
			{if condition="$info.is_sys eq 0 and empty($info.url)"}
			<tr>
				<th>绑定页面 :</th>
				<td>
					<select class="J_cate_select mr10" data-pid="0" data-uri="{:url('OneCate/ajaxGetchilds')}" data-selected="{$spid}"></select>
					<input type="hidden" name="cate_id" id="J_cate_id" />
				</td>
			</tr>
			{/if}
			{notempty name='info.url'}
			<tr>
				<th>链接地址 :</th>
				<td>
					<input type="text" class="input-text" size="40" name="url" value="{$info.url}">
				</td>
			</tr>
			{/notempty}
			<tr>
				<th>导航位置 :</th>
				<td>
					<label><input type="radio" name="pos" value="1" {if condition="$info.pos eq 1"}checked{/if}>页头菜单</label>
					<label><input type="radio" name="pos" value="2" {if condition="$info.pos eq 2"}checked{/if}>页脚菜单</label>
				</td>
			</tr>
			<tr>
				<th>打开方式 :</th>
				<td>
					<label><input type="radio" name="open_type" value="_self" {if condition="$info.open_type eq '_self'"}checked{/if}>当前页面</label>&nbsp;&nbsp;
					<label><input type="radio" name="open_type" value="_blank" {if condition="$info.open_type eq '_blank'"}checked{/if}>新页面</label>
				</td>
			</tr>
			<tr>
				<th>状态 :</th>
				<td>
					<label><input type="radio" name="status" value="1" {if condition="$info.status eq 1"}checked{/if}>启用</label>&nbsp;&nbsp;
					<label><input type="radio" name="status" value="0" {if condition="$info.status eq 0"}checked{/if}> 禁用</label>
				</td>
			</tr>
			<tr>
				<th>SEO 标题 :</th>
				<td><input type="text" name="seo_title" id="seo_title" value="{$info.seo_title}" class="input-text" size="47"></td>
			</tr>
			<tr>
				<th>SEO 关键词 :</th>
				<td><input type="text" name="seo_keys" id="seo_keys" value="{$info.seo_keys}" class="input-text" size="47"></td>
			</tr>
			<tr>
				<th>SEO 描述 :</th>
				<td><textarea name="seo_desc" style="width:340px; height:50px;">{$info.seo_desc}</textarea></td>
			</tr>
			<tr>
				<th></th>
				<td><span style="color:#ff0000;">注：{city}为变量请不要更改，前台会自动替换为用户所选择的城市。可设置多个{city}</span></td>
			</tr>
		</table>
		<input type="hidden" name="id" value="{$info.id}">
	</form>
</div>
<script>
	$(function(){
		$('.J_cate_select').cate_select();
		$.formValidator.initConfig({formid:"info_form",autotip:true});
		$("#title").formValidator({onshow:'请填写名称',onfocus:'请填写名称'}).inputValidator({min:1,onerror:'请填写名称'}).defaultPassed();

		$('#info_form').ajaxForm({success:complate,dataType:'json'});
		function complate(result){
			if(result.status == 1){
				$.dialog.get(result.dialog).close();
				$.yingloujie.tip({content:result.msg});
				setTimeout(function(){window.location.reload();},1000);
			} else {
				$.yingloujie.tip({content:result.msg, icon:'alert'});
			}
		}
	});
</script>